package indy.test.mh;

import indy.test.BlackBoxTest;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;

@BlackBoxTest
public class MethodHandleInvocationTest2 {
  public static void sayHello(String message) {
      System.out.println("hello " + message);
  }
    
  public static void main(String[] args) throws Throwable {
    MethodHandle mh = MethodHandles.publicLookup().findStatic(MethodHandleInvocationTest2.class,
            "sayHello", MethodType.methodType(void.class, String.class));
    
    mh.invokeExact("jsr 292 backport");
  }
}
